package com.hup.utils.commons.hardware;

import lombok.Getter;
import lombok.Setter;

import java.awt.*;

/**
 * @author hugan
 * @date 2020/4/6
 */
public class Beeper {

    /*
    @Bean
    public Beeper beeper() {
        return new Beeper();
    }
    */

    @Getter
    @Setter
    public boolean silent;

    public void beep() {
        if (!silent) {
            Toolkit.getDefaultToolkit().beep();
        }
    }

    public void beepForce() {
        Toolkit.getDefaultToolkit().beep();
    }

}
